//
//  QCSearchCellTableViewCell.swift
//  爱汽车
//
//  Created by tucici on 2024/2/24.
//

import UIKit

class QCSearchCell: UITableViewCell {
     var name:UILabel!
     var mac:UILabel!
     var img:UIImageView!
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        initUI()
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func initUI(){
        selectionStyle = .none
        contentView.bgHexColor = "#1F2022"
        
        name = UILabel()
        name.textHexColor = "#FFFFFF"
        name.font = UIFont.systemFont(ofSize: 16)
        
        mac = UILabel()
        mac.textHexColor = "#FFFFFF"
        mac.font = UIFont.systemFont(ofSize: 12)
        
        img = UIImageView()
        img.image = UIImage(named: "未选择")
        
        contentView.addSubview(name)
        contentView.addSubview(mac)
        contentView.addSubview(img)
        
        name.snp.makeConstraints { make in
            make.left.equalToSuperview().offset(20)
            make.bottom.equalTo(contentView.snp.centerY)
            make.top.equalToSuperview().offset(12)
            make.height.equalTo(18)
        }
        mac.snp.makeConstraints { make in
            make.left.equalToSuperview().offset(20)
            make.top.equalTo(contentView.snp.centerY).offset(2)
            make.bottom.equalToSuperview().inset(14)
            make.height.equalTo(14)
        }
        
        img.snp.makeConstraints { make in
            make.right.equalToSuperview().inset(20)
            make.centerY.equalToSuperview()
            make.size.equalTo(CGSize(width: 20, height: 20))
        }
    }
    
}
